package org.sky.auto.driver;

import java.io.File;

import org.apache.log4j.Logger;
import org.apache.log4j.PropertyConfigurator;
import org.sky.auto.base.AutoBase;
import org.sky.auto.window.Window;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;

public class Base extends IBase{
	static Logger logger = Logger.getLogger(Base.class);
	@BeforeMethod
	public void setUp(){
		PropertyConfigurator.configure("resource"+File.separator+"log4j.properties");
		logger.info("自动化测试初始化成功！日志默认配置成功！");
	}
	
	
	
	@AfterMethod
	public void destory(){
		Window.closeAllWindows();
		//DriverHandler.setHandler(null);
		AutoBase.getAutoDriver().setDriver(Browser.NULL);
		logger.info("自动化测试Case结束，资源释放成功！");
	}
}
